<!--
 * @Descripttion: 详情页
 * @version: 
 * @Author: Bruce
 * @Date: 2020-11-02 14:25:48
 * @LastEditors: Bruce
 * @LastEditTime: 2020-11-17 17:54:28
-->


<template>
	<div class="details" v-loading="loading">
		<el-row type="flex" class="row-bg container">
			<el-col :span="8">
				<p>考试时间：{{ detailsData.emtm }}</p>

				<p>主办单位：{{ detailsData.ogze }}</p>

				<p>考试名称：{{ detailsData.name }}</p>

				<p>考试期数：{{ detailsData.podl }}</p>

				
			</el-col>

			<el-col :span="8">
				<p>证书名称：{{ detailsData.ccnm }}</p>

				<p>考试费：{{ detailsData.cost }}</p>

				<p>报名开始：{{ detailsData.star }}</p>

				<p>报名截止：{{ detailsData.ddle }}</p>

				
			</el-col>

			<el-col :span="8">

				<p>成绩时间：{{ detailsData.gdtm }}</p>
				
				<p>准考证时间：{{ detailsData.attm }}</p>
				
				<p>报名上限：{{ detailsData.tplt }}</p>

			</el-col>
		</el-row>
		<div class="container">
			<div class="container-item">
				<span class="container-item-title">考试描述：</span>
				<div v-html="detailsData.dsib"></div>
			</div>

			<div class="container-item">
				<span class="container-item-title">毕业证样本：</span>
				<el-image style="width: 600px; height: 500px" :src="detailsData.dmsp"></el-image>
			</div>

			<div class="container-item">
				<span class="container-item-title">考纲说明：</span>
				<el-image style="width: 600px; height: 500px" :src="detailsData.epan"></el-image>
			</div>
		</div>
	</div>
</template>

<script>
	import {getExam} from "@/api/apiList/exam.js"
	export default {
		props:{
			id:String
		},
		data() {
			return {
				detailsData: "",
				loading:false
			};
		},
		methods: {
			async API_getExam(id){
				let result = {
					param:{
						id
					}
				}
				return await getExam(result)
			}
		},
		async activated() {
			this.loading = true
			let res = await this.API_getExam(this.id)
			if(res.data.code === 1000){
				this.detailsData = res.data.data
			}
			this.loading = false
		},
	};
</script>

<style lang="scss" scoped>
	.details {
		.container {
			p {
				font-size: 20px;
				padding: 10px;
			}

			.container-item {
				padding: 10px;

				.container-item-title {
					font-size: 20px;
					font-weight: bold;
					display: block;
				}
			}
		}
	}
</style>
